home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-05-19 | 45.6 KB | 2,165 lines |
- #define EXTERN extern
- #include "texd.h"
-
- scanint () {
- /* 30 */ scanint_regmem
- boolean negative ;
- integer m ;
- smallnumber d ;
- boolean vacuous ;
- boolean OKsofar ;
- radix = 0 ;
- OKsofar = true ;
- negative = false ;
- do {
- do { getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( curtok == 3117 )
- {
- negative = ! negative ;
- curtok = 3115 ;
- }
- } while ( ! ( curtok != 3115 ) ) ;
- if ( curtok == 3168 )
- {
- gettoken () ;
- if ( curtok < 4096 )
- {
- curval = curchr ;
- if ( curcmd <= 2 )
- if ( curcmd == 2 )
- incr ( alignstate ) ;
- else decr ( alignstate ) ;
- }
- else if ( curtok < 4225 )
- curval = curtok - 4097 ;
- else curval = curtok - 4225 ;
- if ( curval > 127 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 555 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 556 ;
- helpline [ 0 ] = 557 ;
- }
- curval = 48 ;
- backerror () ;
- }
- else {
-
- getxtoken () ;
- if ( curcmd != 10 )
- backinput () ;
- }
- }
- else if ( ( curcmd >= 67 ) && ( curcmd <= 88 ) )
- scansomethinginterna ( 0 , false ) ;
- else {
-
- radix = 10 ;
- m = 214748364L ;
- if ( curtok == 3111 )
- {
- radix = 8 ;
- m = 268435456L ;
- getxtoken () ;
- }
- else if ( curtok == 3106 )
- {
- radix = 16 ;
- m = 134217728L ;
- getxtoken () ;
- }
- vacuous = true ;
- curval = 0 ;
- while ( true ) {
-
- if ( ( curtok < 3120 + radix ) && ( curtok >= 3120 ) && ( curtok <= 3129
- ) )
- d = curtok - 3120 ;
- else if ( radix == 16 )
- if ( ( curtok <= 2886 ) && ( curtok >= 2881 ) )
- d = curtok - 2871 ;
- else if ( ( curtok <= 3142 ) && ( curtok >= 3137 ) )
- d = curtok - 3127 ;
- else goto lab30 ;
- else goto lab30 ;
- vacuous = false ;
- if ( ( curval >= m ) && ( ( curval > m ) || ( d > 7 ) || ( radix != 10 )
- ) )
- {
- if ( OKsofar )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 558 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 559 ;
- helpline [ 0 ] = 560 ;
- }
- error () ;
- curval = 2147483647L ;
- OKsofar = false ;
- }
- }
- else curval = curval * radix + d ;
- getxtoken () ;
- }
- lab30: ;
- if ( vacuous )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 522 ) ;
- }
- {
- helpptr = 3 ;
- helpline [ 2 ] = 523 ;
- helpline [ 1 ] = 524 ;
- helpline [ 0 ] = 525 ;
- }
- backerror () ;
- }
- else if ( curcmd != 10 )
- backinput () ;
- }
- if ( negative )
- curval = - (integer) curval ;
- }
- zscandimen ( mu , inf , shortcut )
- boolean mu , inf , shortcut ;
- {/* 30 31 32 40 45 88 89 */ scandimen_regmem
- boolean negative ;
- integer f ;
- integer num, denom ;
- smallnumber k ;
- scaled v ;
- integer savecurval ;
- f = 0 ;
- aritherror = false ;
- curorder = 0 ;
- negative = false ;
- if ( ! shortcut )
- {
- negative = false ;
- do {
- do { getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( curtok == 3117 )
- {
- negative = ! negative ;
- curtok = 3115 ;
- }
- } while ( ! ( curtok != 3115 ) ) ;
- if ( ( curcmd >= 67 ) && ( curcmd <= 88 ) )
- if ( mu )
- {
- scansomethinginterna ( 3 , false ) ;
- if ( curvallevel >= 2 )
- {
- v = mem [ curval + 1 ] .cint ;
- deleteglueref ( curval ) ;
- curval = v ;
- }
- if ( curvallevel == 3 )
- goto lab89 ;
- if ( curvallevel != 0 )
- muerror () ;
- }
- else {
-
- scansomethinginterna ( 1 , false ) ;
- if ( curvallevel == 1 )
- goto lab89 ;
- }
- else {
-
- backinput () ;
- if ( curtok == 3116 )
- curtok = 3118 ;
- if ( curtok != 3118 )
- scanint () ;
- else {
-
- radix = 10 ;
- curval = 0 ;
- }
- if ( curtok == 3116 )
- curtok = 3118 ;
- if ( ( radix == 10 ) && ( curtok == 3118 ) )
- {
- k = 0 ;
- gettoken () ;
- while ( true ) {
-
- getxtoken () ;
- if ( ( curtok > 3129 ) || ( curtok < 3120 ) )
- goto lab31 ;
- if ( k < 17 )
- {
- dig [ k ] = curtok - 3120 ;
- incr ( k ) ;
- }
- }
- lab31: f = rounddecimals ( k ) ;
- if ( curcmd != 10 )
- backinput () ;
- }
- }
- }
- if ( curval < 0 )
- {
- negative = ! negative ;
- curval = - (integer) curval ;
- }
- if ( inf )
- if ( scankeyword ( 180 ) )
- {
- curorder = 1 ;
- while ( scankeyword ( 108 ) ) {
-
- if ( curorder == 3 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 562 ) ;
- }
- print ( 563 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 564 ;
- }
- error () ;
- }
- else incr ( curorder ) ;
- }
- goto lab88 ;
- }
- savecurval = curval ;
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( ( curcmd < 67 ) || ( curcmd > 88 ) )
- backinput () ;
- else {
-
- if ( mu )
- {
- scansomethinginterna ( 3 , false ) ;
- if ( curvallevel >= 2 )
- {
- v = mem [ curval + 1 ] .cint ;
- deleteglueref ( curval ) ;
- curval = v ;
- }
- if ( curvallevel != 3 )
- muerror () ;
- }
- else scansomethinginterna ( 1 , false ) ;
- v = curval ;
- goto lab40 ;
- }
- if ( mu )
- goto lab45 ;
- if ( scankeyword ( 565 ) )
- v = ( fontinfo [ 6 + parambase [ eqtb [ 4578 ] .hh .v.RH ] ] .cint ) ;
- else if ( scankeyword ( 566 ) )
- v = ( fontinfo [ 5 + parambase [ eqtb [ 4578 ] .hh .v.RH ] ] .cint ) ;
- else goto lab45 ;
- {
- getxtoken () ;
- if ( curcmd != 10 )
- backinput () ;
- }
- lab40: curval = nxplusy ( savecurval , v , xnoverd ( v , f , 65536L ) ) ;
- goto lab89 ;
- lab45: ;
- if ( mu )
- if ( scankeyword ( 205 ) )
- goto lab88 ;
- else {
-
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 562 ) ;
- }
- print ( 567 ) ;
- {
- helpptr = 4 ;
- helpline [ 3 ] = 568 ;
- helpline [ 2 ] = 569 ;
- helpline [ 1 ] = 570 ;
- helpline [ 0 ] = 571 ;
- }
- error () ;
- goto lab88 ;
- }
- if ( scankeyword ( 561 ) )
- {
- preparemag () ;
- if ( eqtb [ 5284 ] .cint != 1000 )
- {
- curval = xnoverd ( curval , 1000 , eqtb [ 5284 ] .cint ) ;
- f = ( 1000 * f + 65536L * remainder ) / eqtb [ 5284 ] .cint ;
- curval = curval + ( f / 65536L ) ;
- f = f % 65536L ;
- }
- }
- if ( scankeyword ( 262 ) )
- goto lab88 ;
- if ( scankeyword ( 572 ) )
- {
- num = 7227 ;
- denom = 100 ;
- }
- else if ( scankeyword ( 573 ) )
- {
- num = 12 ;
- denom = 1 ;
- }
- else if ( scankeyword ( 574 ) )
- {
- num = 7227 ;
- denom = 254 ;
- }
- else if ( scankeyword ( 575 ) )
- {
- num = 7227 ;
- denom = 2540 ;
- }
- else if ( scankeyword ( 576 ) )
- {
- num = 7227 ;
- denom = 7200 ;
- }
- else if ( scankeyword ( 577 ) )
- {
- num = 1238 ;
- denom = 1157 ;
- }
- else if ( scankeyword ( 578 ) )
- {
- num = 14856 ;
- denom = 1157 ;
- }
- else if ( scankeyword ( 579 ) )
- goto lab30 ;
- else {
-
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 562 ) ;
- }
- print ( 580 ) ;
- {
- helpptr = 6 ;
- helpline [ 5 ] = 581 ;
- helpline [ 4 ] = 582 ;
- helpline [ 3 ] = 583 ;
- helpline [ 2 ] = 569 ;
- helpline [ 1 ] = 570 ;
- helpline [ 0 ] = 571 ;
- }
- error () ;
- goto lab32 ;
- }
- curval = xnoverd ( curval , num , denom ) ;
- f = ( num * f + 65536L * remainder ) / denom ;
- curval = curval + ( f / 65536L ) ;
- f = f % 65536L ;
- lab32: ;
- lab88: if ( curval >= 16384 )
- aritherror = true ;
- else curval = curval * 65536L + f ;
- lab30: ;
- {
- getxtoken () ;
- if ( curcmd != 10 )
- backinput () ;
- }
- lab89: if ( aritherror || ( abs ( curval ) >= 1073741824L ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 584 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 585 ;
- helpline [ 0 ] = 586 ;
- }
- error () ;
- curval = 1073741823L ;
- aritherror = false ;
- }
- if ( negative )
- curval = - (integer) curval ;
- }
- zscanglue ( level )
- smallnumber level ;
- {/* 10 */ scanglue_regmem
- boolean negative ;
- halfword q ;
- boolean mu ;
- mu = ( level == 3 ) ;
- negative = false ;
- do {
- do { getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( curtok == 3117 )
- {
- negative = ! negative ;
- curtok = 3115 ;
- }
- } while ( ! ( curtok != 3115 ) ) ;
- if ( ( curcmd >= 67 ) && ( curcmd <= 88 ) )
- {
- scansomethinginterna ( level , negative ) ;
- if ( curvallevel >= 2 )
- {
- if ( curvallevel != level )
- muerror () ;
- return ;
- }
- if ( curvallevel == 0 )
- scandimen ( mu , false , true ) ;
- else if ( level == 3 )
- muerror () ;
- }
- else {
-
- backinput () ;
- scandimen ( mu , false , false ) ;
- if ( negative )
- curval = - (integer) curval ;
- }
- q = newspec ( 0 ) ;
- mem [ q + 1 ] .cint = curval ;
- if ( scankeyword ( 587 ) )
- {
- scandimen ( mu , true , false ) ;
- mem [ q + 2 ] .cint = curval ;
- mem [ q ] .hh.b0 = curorder ;
- }
- if ( scankeyword ( 588 ) )
- {
- scandimen ( mu , true , false ) ;
- mem [ q + 3 ] .cint = curval ;
- mem [ q ] .hh.b1 = curorder ;
- }
- curval = q ;
- }
- halfword scanrulespec () {
- /* 21 */ register halfword Result;
- scanrulespec_regmem
- halfword q ;
- q = newrule () ;
- if ( curcmd == 35 )
- mem [ q + 1 ] .cint = 26214 ;
- else {
-
- mem [ q + 3 ] .cint = 26214 ;
- mem [ q + 2 ] .cint = 0 ;
- }
- lab21: if ( scankeyword ( 589 ) )
- {
- scandimen ( false , false , false ) ;
- mem [ q + 1 ] .cint = curval ;
- goto lab21 ;
- }
- if ( scankeyword ( 590 ) )
- {
- scandimen ( false , false , false ) ;
- mem [ q + 3 ] .cint = curval ;
- goto lab21 ;
- }
- if ( scankeyword ( 591 ) )
- {
- scandimen ( false , false , false ) ;
- mem [ q + 2 ] .cint = curval ;
- goto lab21 ;
- }
- Result = q ;
- return(Result) ;
- }
- halfword strtoks () {
- register halfword Result; strtoks_regmem
- halfword p ;
- halfword q ;
- halfword t ;
- poolpointer k ;
- {
- if ( poolptr + 1 > poolsize )
- overflow ( 128 , poolsize - initpoolptr ) ;
- }
- p = memtop - 3 ;
- mem [ p ] .hh .v.RH = 0 ;
- k = strstart [ strptr ] ;
- while ( k < poolptr ) {
-
- t = strpool [ k ] ;
- if ( t == 32 )
- t = 2592 ;
- else t = 3072 + t ;
- {
- {
- q = avail ;
- if ( q == 0 )
- q = getavail () ;
- else {
-
- avail = mem [ q ] .hh .v.RH ;
- mem [ q ] .hh .v.RH = 0 ;
- ;
- #ifdef STAT
- incr ( dynused ) ;
- #endif /* STAT */
- }
- }
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = t ;
- p = q ;
- }
- incr ( k ) ;
- }
- poolptr = strstart [ strptr ] ;
- Result = p ;
- return(Result) ;
- }
- halfword thetoks () {
- register halfword Result; thetoks_regmem
- schar oldsetting ;
- halfword p, q, r ;
- getxtoken () ;
- scansomethinginterna ( 5 , false ) ;
- if ( curvallevel >= 4 )
- {
- p = memtop - 3 ;
- mem [ p ] .hh .v.RH = 0 ;
- if ( curvallevel == 4 )
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = 4096 + curval ;
- p = q ;
- }
- else if ( curval != 0 )
- {
- r = mem [ curval ] .hh .v.RH ;
- while ( r != 0 ) {
-
- {
- {
- q = avail ;
- if ( q == 0 )
- q = getavail () ;
- else {
-
- avail = mem [ q ] .hh .v.RH ;
- mem [ q ] .hh .v.RH = 0 ;
- ;
- #ifdef STAT
- incr ( dynused ) ;
- #endif /* STAT */
- }
- }
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = mem [ r ] .hh .v.LH ;
- p = q ;
- }
- r = mem [ r ] .hh .v.RH ;
- }
- }
- Result = p ;
- }
- else {
-
- oldsetting = selector ;
- selector = 21 ;
- switch ( curvallevel )
- {case 0 :
- printint ( curval ) ;
- break ;
- case 1 :
- {
- printscaled ( curval ) ;
- print ( 262 ) ;
- }
- break ;
- case 2 :
- {
- printspec ( curval , 262 ) ;
- deleteglueref ( curval ) ;
- }
- break ;
- case 3 :
- {
- printspec ( curval , 205 ) ;
- deleteglueref ( curval ) ;
- }
- break ;
- }
- selector = oldsetting ;
- Result = strtoks () ;
- }
- return(Result) ;
- }
- insthetoks () {
- insthetoks_regmem
- mem [ memtop - 12 ] .hh .v.RH = thetoks () ;
- begintokenlist ( mem [ memtop - 3 ] .hh .v.RH , 4 ) ;
- }
- convtoks () {
- convtoks_regmem
- schar oldsetting ;
- schar c ;
- smallnumber savescannerstatus ;
- c = curchr ;
- switch ( c )
- {case 0 :
- case 1 :
- scanint () ;
- break ;
- case 2 :
- case 3 :
- {
- savescannerstatus = scannerstatus ;
- scannerstatus = 0 ;
- gettoken () ;
- scannerstatus = savescannerstatus ;
- }
- break ;
- case 4 :
- scanfontident () ;
- break ;
- case 5 :
- if ( jobname == 0 )
- openlogfile () ;
- break ;
- }
- oldsetting = selector ;
- selector = 21 ;
- switch ( c )
- {case 0 :
- printint ( curval ) ;
- break ;
- case 1 :
- printromanint ( curval ) ;
- break ;
- case 2 :
- if ( curcs != 0 )
- sprintcs ( curcs ) ;
- else printchar ( curchr ) ;
- break ;
- case 3 :
- printmeaning () ;
- break ;
- case 4 :
- {
- print ( fontname [ curval ] ) ;
- if ( fontsize [ curval ] != fontdsize [ curval ] )
- {
- print ( 598 ) ;
- printscaled ( fontsize [ curval ] ) ;
- print ( 262 ) ;
- }
- }
- break ;
- case 5 :
- print ( jobname ) ;
- break ;
- }
- selector = oldsetting ;
- mem [ memtop - 12 ] .hh .v.RH = strtoks () ;
- begintokenlist ( mem [ memtop - 3 ] .hh .v.RH , 4 ) ;
- }
- halfword zscantoks ( macrodef , xpand )
- boolean macrodef , xpand ;
- {/* 40 30 31 32 */ register halfword Result; scantoks_regmem
- halfword t ;
- halfword s ;
- halfword p ;
- halfword q ;
- halfword unbalance ;
- halfword hashbrace ;
- if ( macrodef )
- scannerstatus = 2 ;
- else scannerstatus = 5 ;
- warningindex = curcs ;
- defref = getavail () ;
- mem [ defref ] .hh .v.LH = 0 ;
- p = defref ;
- hashbrace = 0 ;
- t = 3120 ;
- if ( macrodef )
- {
- while ( true ) {
-
- gettoken () ;
- if ( curtok < 768 )
- goto lab31 ;
- if ( curcmd == 6 )
- {
- s = 3328 + curchr ;
- gettoken () ;
- if ( curcmd == 1 )
- {
- hashbrace = curtok ;
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = curtok ;
- p = q ;
- }
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = 3584 ;
- p = q ;
- }
- goto lab30 ;
- }
- if ( t == 3129 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 601 ) ;
- }
- {
- helpptr = 1 ;
- helpline [ 0 ] = 602 ;
- }
- error () ;
- }
- else {
-
- incr ( t ) ;
- if ( curtok != t )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 603 ) ;
- }
- {
- helpptr = 2 ;
- helpline [ 1 ] = 604 ;
- helpline [ 0 ] = 605 ;
- }
- backerror () ;
- }
- curtok = s ;
- }
- }
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = curtok ;
- p = q ;
- }
- }
- lab31: {
-
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = 3584 ;
- p = q ;
- }
- if ( curcmd == 2 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 515 ) ;
- }
- incr ( alignstate ) ;
- {
- helpptr = 2 ;
- helpline [ 1 ] = 599 ;
- helpline [ 0 ] = 600 ;
- }
- error () ;
- goto lab40 ;
- }
- lab30: ;
- }
- else scanleftbrace () ;
- unbalance = 1 ;
- while ( true ) {
-
- if ( xpand )
- {
- while ( true ) {
-
- getnext () ;
- if ( curcmd <= 99 )
- goto lab32 ;
- if ( curcmd != 108 )
- expand () ;
- else {
-
- q = thetoks () ;
- if ( mem [ memtop - 3 ] .hh .v.RH != 0 )
- {
- mem [ p ] .hh .v.RH = mem [ memtop - 3 ] .hh .v.RH ;
- p = q ;
- }
- }
- }
- lab32: xtoken () ;
- }
- else gettoken () ;
- if ( curtok < 768 )
- if ( curcmd < 2 )
- incr ( unbalance ) ;
- else {
-
- decr ( unbalance ) ;
- if ( unbalance == 0 )
- goto lab40 ;
- }
- else if ( curcmd == 6 )
- if ( macrodef )
- {
- s = curtok ;
- if ( xpand )
- getxtoken () ;
- else gettoken () ;
- if ( curcmd != 6 )
- if ( ( curtok <= 3120 ) || ( curtok > t ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 606 ) ;
- }
- sprintcs ( warningindex ) ;
- {
- helpptr = 3 ;
- helpline [ 2 ] = 607 ;
- helpline [ 1 ] = 608 ;
- helpline [ 0 ] = 609 ;
- }
- backerror () ;
- curtok = s ;
- }
- else curtok = 1232 + curchr ;
- }
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = curtok ;
- p = q ;
- }
- }
- lab40: scannerstatus = 0 ;
- if ( hashbrace != 0 )
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = hashbrace ;
- p = q ;
- }
- Result = p ;
- return(Result) ;
- }
- zreadtoks ( n , r )
- integer n ;
- halfword r ;
- {/* 30 */ readtoks_regmem
- halfword p ;
- halfword q ;
- integer s ;
- smallnumber m ;
- scannerstatus = 2 ;
- warningindex = r ;
- defref = getavail () ;
- mem [ defref ] .hh .v.LH = 0 ;
- p = defref ;
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = 3584 ;
- p = q ;
- }
- if ( ( n < 0 ) || ( n > 15 ) )
- m = 16 ;
- else m = n ;
- s = alignstate ;
- alignstate = 1000000L ;
- do {
- beginfilereading () ;
- curinput .namefield = m + 1 ;
- if ( readopen [ m ] == 2 )
- if ( interaction > 1 )
- if ( n < 0 )
- {
- wakeupterminal () ;
- print ( 206 ) ;
- terminput () ;
- }
- else {
-
- wakeupterminal () ;
- println () ;
- sprintcs ( r ) ;
- {
- wakeupterminal () ;
- print ( 61 ) ;
- terminput () ;
- }
- n = -1 ;
- }
- else fatalerror ( 610 ) ;
- else if ( readopen [ m ] == 1 )
- if ( inputln ( readfile [ m ] , false ) )
- readopen [ m ] = 0 ;
- else {
-
- aclose ( readfile [ m ] ) ;
- readopen [ m ] = 2 ;
- }
- else {
-
- if ( ! inputln ( readfile [ m ] , true ) )
- {
- aclose ( readfile [ m ] ) ;
- readopen [ m ] = 2 ;
- if ( alignstate != 1000000L )
- {
- runaway () ;
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 611 ) ;
- }
- printesc ( 392 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 612 ;
- }
- alignstate = 1000000L ;
- error () ;
- }
- }
- }
- curinput .limitfield = last ;
- if ( ( eqtb [ 5315 ] .cint < 0 ) || ( eqtb [ 5315 ] .cint > 127 ) )
- decr ( curinput .limitfield ) ;
- else buffer [ curinput .limitfield ] = eqtb [ 5315 ] .cint ;
- first = curinput .limitfield + 1 ;
- curinput .locfield = curinput .startfield ;
- curinput .statefield = 33 ;
- while ( true ) {
-
- gettoken () ;
- if ( curtok == 0 )
- goto lab30 ;
- {
- q = getavail () ;
- mem [ p ] .hh .v.RH = q ;
- mem [ q ] .hh .v.LH = curtok ;
- p = q ;
- }
- }
- lab30: endfilereading () ;
- } while ( ! ( alignstate == 1000000L ) ) ;
- curval = defref ;
- scannerstatus = 0 ;
- alignstate = s ;
- }
- passtext () {
- /* 30 */ passtext_regmem
- integer l ;
- smallnumber savescannerstatus ;
- savescannerstatus = scannerstatus ;
- scannerstatus = 1 ;
- l = 0 ;
- skipline = line ;
- while ( true ) {
-
- getnext () ;
- if ( curcmd == 105 )
- {
- if ( l == 0 )
- goto lab30 ;
- if ( curchr == 2 )
- decr ( l ) ;
- }
- else if ( curcmd == 104 )
- incr ( l ) ;
- }
- lab30: scannerstatus = savescannerstatus ;
- }
- zchangeiflimit ( l , p )
- smallnumber l ;
- halfword p ;
- {/* 10 */ changeiflimit_regmem
- halfword q ;
- if ( p == condptr )
- iflimit = l ;
- else {
-
- q = condptr ;
- while ( true ) {
-
- if ( q == 0 )
- confusion ( 613 ) ;
- if ( mem [ q ] .hh .v.RH == p )
- {
- mem [ q ] .hh.b0 = l ;
- return ;
- }
- q = mem [ q ] .hh .v.RH ;
- }
- }
- }
- conditional () {
- /* 10 50 */ conditional_regmem
- boolean b ;
- schar r ;
- integer m, n ;
- halfword p, q ;
- smallnumber savescannerstatus ;
- halfword savecondptr ;
- smallnumber thisif ;
- {
- p = getnode ( 2 ) ;
- mem [ p ] .hh .v.RH = condptr ;
- mem [ p ] .hh.b0 = iflimit ;
- mem [ p ] .hh.b1 = curif ;
- mem [ p + 1 ] .cint = ifline ;
- condptr = p ;
- curif = curchr ;
- iflimit = 1 ;
- ifline = line ;
- }
- savecondptr = condptr ;
- thisif = curchr ;
- switch ( thisif )
- {case 0 :
- case 1 :
- {
- {
- getxtoken () ;
- if ( curcmd == 0 )
- if ( curchr == 257 )
- {
- curcmd = 13 ;
- curchr = curtok - 4097 ;
- }
- }
- if ( ( curcmd > 13 ) || ( curchr > 127 ) )
- {
- m = 0 ;
- n = 256 ;
- }
- else {
-
- m = curcmd ;
- n = curchr ;
- }
- {
- getxtoken () ;
- if ( curcmd == 0 )
- if ( curchr == 257 )
- {
- curcmd = 13 ;
- curchr = curtok - 4097 ;
- }
- }
- if ( ( curcmd > 13 ) || ( curchr > 127 ) )
- {
- curcmd = 0 ;
- curchr = 256 ;
- }
- if ( thisif == 0 )
- b = ( n == curchr ) ;
- else b = ( m == curcmd ) ;
- }
- break ;
- case 2 :
- case 3 :
- {
- if ( thisif == 2 )
- scanint () ;
- else scandimen ( false , false , false ) ;
- n = curval ;
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( ( curtok >= 3132 ) && ( curtok <= 3134 ) )
- r = curtok - 3072 ;
- else {
-
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 637 ) ;
- }
- printcmdchr ( 104 , thisif ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 638 ;
- }
- backerror () ;
- r = 61 ;
- }
- if ( thisif == 2 )
- scanint () ;
- else scandimen ( false , false , false ) ;
- switch ( r )
- {case 60 :
- b = ( n < curval ) ;
- break ;
- case 61 :
- b = ( n == curval ) ;
- break ;
- case 62 :
- b = ( n > curval ) ;
- break ;
- }
- }
- break ;
- case 4 :
- {
- scanint () ;
- b = odd ( curval ) ;
- }
- break ;
- case 5 :
- b = ( abs ( curlist .modefield ) == 1 ) ;
- break ;
- case 6 :
- b = ( abs ( curlist .modefield ) == 101 ) ;
- break ;
- case 7 :
- b = ( abs ( curlist .modefield ) == 201 ) ;
- break ;
- case 8 :
- b = ( curlist .modefield < 0 ) ;
- break ;
- case 9 :
- case 10 :
- case 11 :
- {
- scaneightbitint () ;
- p = eqtb [ 4322 + curval ] .hh .v.RH ;
- if ( thisif == 9 )
- b = ( p == 0 ) ;
- else if ( p == 0 )
- b = false ;
- else if ( thisif == 10 )
- b = ( mem [ p ] .hh.b0 == 0 ) ;
- else b = ( mem [ p ] .hh.b0 == 1 ) ;
- }
- break ;
- case 12 :
- {
- savescannerstatus = scannerstatus ;
- scannerstatus = 0 ;
- getnext () ;
- n = curcs ;
- p = curcmd ;
- q = curchr ;
- getnext () ;
- if ( curcmd != p )
- b = false ;
- else if ( curcmd < 110 )
- b = ( curchr == q ) ;
- else {
-
- p = mem [ curchr ] .hh .v.RH ;
- q = mem [ eqtb [ n ] .hh .v.RH ] .hh .v.RH ;
- while ( ( p != 0 ) && ( q != 0 ) ) if ( mem [ p ] .hh .v.LH != mem [ q
- ] .hh .v.LH )
- p = 0 ;
- else {
-
- p = mem [ p ] .hh .v.RH ;
- q = mem [ q ] .hh .v.RH ;
- }
- b = ( ( p == 0 ) && ( q == 0 ) ) ;
- }
- scannerstatus = savescannerstatus ;
- }
- break ;
- case 13 :
- {
- scanfourbitint () ;
- b = ( readopen [ curval ] == 2 ) ;
- }
- break ;
- case 14 :
- b = true ;
- break ;
- case 15 :
- b = false ;
- break ;
- case 16 :
- {
- scanint () ;
- n = curval ;
- if ( eqtb [ 5303 ] .cint > 1 )
- {
- begindiagnostic () ;
- print ( 639 ) ;
- printint ( n ) ;
- printchar ( 125 ) ;
- enddiagnostic ( false ) ;
- }
- while ( n != 0 ) {
-
- passtext () ;
- if ( condptr == savecondptr )
- if ( curchr == 4 )
- decr ( n ) ;
- else goto lab50 ;
- else if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- }
- changeiflimit ( 4 , savecondptr ) ;
- return ;
- }
- break ;
- }
- if ( eqtb [ 5303 ] .cint > 1 )
- {
- begindiagnostic () ;
- if ( b )
- print ( 635 ) ;
- else print ( 636 ) ;
- enddiagnostic ( false ) ;
- }
- if ( b )
- {
- changeiflimit ( 3 , savecondptr ) ;
- return ;
- }
- while ( true ) {
-
- passtext () ;
- if ( condptr == savecondptr )
- {
- if ( curchr != 4 )
- goto lab50 ;
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 633 ) ;
- }
- printesc ( 631 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 634 ;
- }
- error () ;
- }
- else if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- }
- lab50: if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- else iflimit = 2 ;
- }
- beginname () {
- beginname_regmem
- areadelimiter = 0 ;
- extdelimiter = 0 ;
- }
- boolean zmorename ( c )
- ASCIIcode c ;
- {register boolean Result; morename_regmem
- if ( c == 32 )
- Result = false ;
- else {
-
- if ( ( c == 47 ) )
- {
- areadelimiter = poolptr ;
- extdelimiter = 0 ;
- }
- else if ( ( c == 46 ) && ( extdelimiter == 0 ) )
- extdelimiter = poolptr ;
- {
- if ( poolptr + 1 > poolsize )
- overflow ( 128 , poolsize - initpoolptr ) ;
- }
- {
- strpool [ poolptr ] = c ;
- incr ( poolptr ) ;
- }
- Result = true ;
- }
- return(Result) ;
- }
- endname () {
- endname_regmem
- if ( strptr + 3 > maxstrings )
- overflow ( 129 , maxstrings - initstrptr ) ;
- if ( areadelimiter == 0 )
- curarea = 206 ;
- else {
-
- curarea = strptr ;
- incr ( strptr ) ;
- strstart [ strptr ] = areadelimiter + 1 ;
- }
- if ( extdelimiter == 0 )
- {
- curext = 206 ;
- curname = makestring () ;
- }
- else {
-
- curname = strptr ;
- incr ( strptr ) ;
- strstart [ strptr ] = extdelimiter ;
- curext = makestring () ;
- }
- }
- zpackfilename ( n , a , e )
- strnumber n , a , e ;
- {packfilename_regmem
- integer k ;
- ASCIIcode c ;
- poolpointer j ;
- k = 0 ;
- {register integer for_end; j = strstart [ a ] ; for_end = strstart [ a + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = strstart [ n ] ; for_end = strstart [ n + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = strstart [ e ] ; for_end = strstart [ e + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- if ( k <= filenamesize )
- namelength = k ;
- else namelength = filenamesize ;
- {register integer for_end; k = namelength + 1 ; for_end = filenamesize
- ; if ( k <= for_end) do
- nameoffile [ k ] = ' ' ;
- while ( k++ < for_end ) ; }
- }
- zpackbufferedname ( n , a , b )
- smallnumber n ;
- integer a , b ;
- {packbufferedname_regmem
- integer k ;
- ASCIIcode c ;
- integer j ;
- if ( n + b - a + 5 > filenamesize )
- b = a + filenamesize - n - 5 ;
- k = 0 ;
- {register integer for_end; j = 1 ; for_end = n ; if ( j <= for_end) do
- {
- c = xord [ TEXformatdefault [ j ] ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = a ; for_end = b ; if ( j <= for_end) do
- {
- c = buffer [ j ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = 6 ; for_end = 9 ; if ( j <= for_end) do
- {
- c = xord [ TEXformatdefault [ j ] ] ;
- incr ( k ) ;
- if ( k <= filenamesize )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- if ( k <= filenamesize )
- namelength = k ;
- else namelength = filenamesize ;
- {register integer for_end; k = namelength + 1 ; for_end = filenamesize
- ; if ( k <= for_end) do
- nameoffile [ k ] = ' ' ;
- while ( k++ < for_end ) ; }
- }
- strnumber makenamestring () {
- register strnumber Result; makenamestring_regmem
- integer k, kstart ;
- k = 1 ;
- while ( ( k < filenamesize ) && ( xord [ realnameoffile [ k ] ] != 32 ) )
- incr ( k ) ;
- namelength = k - 1 ;
- {
- if ( poolptr + namelength > poolsize )
- overflow ( 128 , poolsize - initpoolptr ) ;
- }
- if ( ( xord [ realnameoffile [ 1 ] ] == 46 ) && ( xord [ realnameoffile [ 2
- ] ] == 47 ) )
- kstart = 3 ;
- else kstart = 1 ;
- {register integer for_end; k = kstart ; for_end = namelength ; if ( k <=
- for_end) do
- {
- strpool [ poolptr ] = xord [ realnameoffile [ k ] ] ;
- incr ( poolptr ) ;
- }
- while ( k++ < for_end ) ; }
- Result = makestring () ;
- return(Result) ;
- }
- scanfilename () {
- /* 30 */ scanfilename_regmem
- nameinprogress = true ;
- beginname () ;
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- while ( true ) {
-
- if ( ( curcmd > 12 ) || ( curchr > 127 ) )
- {
- backinput () ;
- goto lab30 ;
- }
- if ( ! morename ( curchr ) )
- goto lab30 ;
- getxtoken () ;
- }
- lab30: endname () ;
- nameinprogress = false ;
- }
- zpackjobname ( s )
- strnumber s ;
- {packjobname_regmem
- curarea = 206 ;
- curext = s ;
- curname = jobname ;
- packfilename ( curname , curarea , curext ) ;
- }
- zpromptfilename ( s , e )
- strnumber s , e ;
- {/* 30 */ promptfilename_regmem
- integer k ;
- if ( interaction == 2 )
- wakeupterminal () ;
- if ( s == 640 )
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 641 ) ;
- }
- else {
-
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 642 ) ;
- }
- printfilename ( curname , curarea , curext ) ;
- print ( 643 ) ;
- if ( e == 644 )
- showcontext () ;
- printnl ( 645 ) ;
- print ( s ) ;
- if ( interaction < 2 )
- fatalerror ( 646 ) ;
- clearterminal () ;
- {
- wakeupterminal () ;
- print ( 426 ) ;
- terminput () ;
- }
- {
- beginname () ;
- k = first ;
- while ( ( buffer [ k ] == 32 ) && ( k < last ) ) incr ( k ) ;
- while ( true ) {
-
- if ( k == last )
- goto lab30 ;
- if ( ! morename ( buffer [ k ] ) )
- goto lab30 ;
- incr ( k ) ;
- }
- lab30: endname () ;
- }
- if ( curext == 206 )
- curext = e ;
- packfilename ( curname , curarea , curext ) ;
- }
- openlogfile () {
- openlogfile_regmem
- schar oldsetting ;
- integer k ;
- integer l ;
- ccharpointer months ;
- oldsetting = selector ;
- if ( jobname == 0 )
- jobname = 649 ;
- packjobname ( 650 ) ;
- while ( ! aopenout ( logfile ) ) {
-
- if ( interaction < 2 )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 642 ) ;
- }
- printfilename ( curname , curarea , curext ) ;
- print ( 643 ) ;
- jobname = 0 ;
- history = 3 ;
- jumpout () ;
- }
- promptfilename ( 652 , 650 ) ;
- }
- logname = amakenamestring ( logfile ) ;
- selector = 18 ;
- {
- (void) Fputs( logfile , "This is TeX, C Version 2.9" ) ;
- print ( formatident ) ;
- print ( 653 ) ;
- printint ( eqtb [ 5288 ] .cint ) ;
- printchar ( 32 ) ;
- months = " JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC" ;
- {register integer for_end; k = 3 * eqtb [ 5289 ] .cint - 2 ; for_end = 3
- * eqtb [ 5289 ] .cint ; if ( k <= for_end) do
- (void) putc( months [ k ] , logfile );
- while ( k++ < for_end ) ; }
- printchar ( 32 ) ;
- printint ( eqtb [ 5290 ] .cint ) ;
- printchar ( 32 ) ;
- printtwo ( eqtb [ 5287 ] .cint / 60 ) ;
- printchar ( 58 ) ;
- printtwo ( eqtb [ 5287 ] .cint % 60 ) ;
- }
- inputstack [ inputptr ] = curinput ;
- printnl ( 651 ) ;
- l = inputstack [ 0 ] .limitfield ;
- if ( buffer [ l ] == eqtb [ 5315 ] .cint )
- decr ( l ) ;
- {register integer for_end; k = 1 ; for_end = l ; if ( k <= for_end) do
- print ( buffer [ k ] ) ;
- while ( k++ < for_end ) ; }
- println () ;
- selector = oldsetting + 2 ;
- }
- startinput () {
- /* 30 */ startinput_regmem
- scanfilename () ;
- if ( curext == 206 )
- curext = 644 ;
- packfilename ( curname , curarea , curext ) ;
- while ( true ) {
-
- beginfilereading () ;
- if ( aopenin ( inputfile [ curinput .indexfield ] , inputpathspec ) )
- goto lab30 ;
- endfilereading () ;
- promptfilename ( 640 , 644 ) ;
- }
- lab30: curinput .namefield = amakenamestring ( inputfile [ curinput
- .indexfield ] ) ;
- if ( jobname == 0 )
- {
- jobname = curname ;
- openlogfile () ;
- }
- if ( termoffset + ( strstart [ curinput .namefield + 1 ] - strstart [
- curinput .namefield ] ) > maxprintline - 2 )
- println () ;
- else if ( ( termoffset > 0 ) || ( fileoffset > 0 ) )
- printchar ( 32 ) ;
- printchar ( 40 ) ;
- print ( curinput .namefield ) ;
- termflush ( stdout ) ;
- curinput .statefield = 33 ;
- {
- if ( ! inputln ( inputfile [ curinput .indexfield ] , false ) )
- ;
- firmuptheline () ;
- if ( ( eqtb [ 5315 ] .cint < 0 ) || ( eqtb [ 5315 ] .cint > 127 ) )
- decr ( curinput .limitfield ) ;
- else buffer [ curinput .limitfield ] = eqtb [ 5315 ] .cint ;
- first = curinput .limitfield + 1 ;
- curinput .locfield = curinput .startfield ;
- line = 1 ;
- }
- }
- internalfontnumber zreadfontinfo ( u , nom , aire , s )
- halfword u ;
- strnumber nom , aire ;
- scaled s ;
- {/* 30 11 45 */ register internalfontnumber Result;
- readfontinfo_regmem
- integer k ;
- boolean fileopened ;
- halfword lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np ;
- internalfontnumber f ;
- internalfontnumber g ;
- eightbits a, b, c, d ;
- fourquarters qw ;
- scaled sw ;
- scaled z ;
- integer alpha ;
- schar beta ;
- g = 0 ;
- fileopened = false ;
- packfilename ( nom , aire , 664 ) ;
- if ( ! bopenin ( tfmfile ) )
- goto lab11 ;
- fileopened = true ;
- {
- {
- lf = tfmtemp ;
- if ( lf > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- lf = lf * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- lh = tfmtemp ;
- if ( lh > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- lh = lh * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- bc = tfmtemp ;
- if ( bc > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- bc = bc * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ec = tfmtemp ;
- if ( ec > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ec = ec * 256 + tfmtemp ;
- }
- if ( ( bc > ec + 1 ) || ( ec > 255 ) )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- {
- nw = tfmtemp ;
- if ( nw > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nw = nw * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nh = tfmtemp ;
- if ( nh > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nh = nh * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nd = tfmtemp ;
- if ( nd > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nd = nd * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ni = tfmtemp ;
- if ( ni > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ni = ni * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nl = tfmtemp ;
- if ( nl > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nl = nl * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nk = tfmtemp ;
- if ( nk > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nk = nk * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ne = tfmtemp ;
- if ( ne > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ne = ne * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- np = tfmtemp ;
- if ( np > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- np = np * 256 + tfmtemp ;
- }
- if ( lf != 6 + lh + ( ec - bc + 1 ) + nw + nh + nd + ni + nl + nk + ne +
- np )
- goto lab11 ;
- }
- lf = lf - 6 - lh ;
- if ( np < 7 )
- lf = lf + 7 - np ;
- if ( ( fontptr == fontmax ) || ( fmemptr + lf > fontmemsize ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 655 ) ;
- }
- sprintcs ( u ) ;
- printchar ( 61 ) ;
- printfilename ( nom , aire , 206 ) ;
- if ( s >= 0 )
- {
- print ( 598 ) ;
- printscaled ( s ) ;
- print ( 262 ) ;
- }
- else if ( s != -1000 )
- {
- print ( 656 ) ;
- printint ( - (integer) s ) ;
- }
- print ( 665 ) ;
- {
- helpptr = 4 ;
- helpline [ 3 ] = 666 ;
- helpline [ 2 ] = 667 ;
- helpline [ 1 ] = 668 ;
- helpline [ 0 ] = 669 ;
- }
- error () ;
- goto lab30 ;
- }
- f = fontptr + 1 ;
- charbase [ f ] = fmemptr - bc ;
- widthbase [ f ] = charbase [ f ] + ec + 1 ;
- heightbase [ f ] = widthbase [ f ] + nw ;
- depthbase [ f ] = heightbase [ f ] + nh ;
- italicbase [ f ] = depthbase [ f ] + nd ;
- ligkernbase [ f ] = italicbase [ f ] + ni ;
- kernbase [ f ] = ligkernbase [ f ] + nl ;
- extenbase [ f ] = kernbase [ f ] + nk ;
- parambase [ f ] = extenbase [ f ] + ne ;
- {
- if ( lh < 2 )
- goto lab11 ;
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontcheck [ f ] = qw ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- z = tfmtemp ;
- if ( z > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- z = z * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- z = z * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- z = ( z * 16 ) + ( tfmtemp / 16 ) ;
- if ( z < 65536L )
- goto lab11 ;
- while ( lh > 2 ) {
-
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- decr ( lh ) ;
- }
- fontdsize [ f ] = z ;
- if ( s != -1000 )
- if ( s >= 0 )
- z = s ;
- else z = xnoverd ( z , - (integer) s , 1000 ) ;
- fontsize [ f ] = z ;
- }
- {register integer for_end; k = fmemptr ; for_end = widthbase [ f ] - 1
- ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- if ( ( a >= nw ) || ( b / 16 >= nh ) || ( b % 16 >= nd ) || ( c / 4 >=
- ni ) )
- goto lab11 ;
- switch ( c % 4 )
- {case 1 :
- if ( d >= nl )
- goto lab11 ;
- break ;
- case 3 :
- if ( d >= ne )
- goto lab11 ;
- break ;
- case 2 :
- {
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- while ( d < k + bc - fmemptr ) {
-
- qw = fontinfo [ charbase [ f ] + d ] .qqqq ;
- if ( ( ( qw .b2 ) % 4 ) != 2 )
- goto lab45 ;
- d = qw .b3 ;
- }
- if ( d == k + bc - fmemptr )
- goto lab11 ;
- lab45: ;
- }
- break ;
- default:
- ;
- break ;
- }
- }
- while ( k++ < for_end ) ; }
- {
- {
- alpha = 16 ;
- while ( z >= 8388608L ) {
-
- z = z / 2 ;
- alpha = alpha + alpha ;
- }
- beta = 256 / alpha ;
- alpha = alpha * z ;
- }
- {register integer for_end; k = widthbase [ f ] ; for_end = ligkernbase [
- f ] - 1 ; if ( k <= for_end) do
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ k ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ k ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- if ( fontinfo [ widthbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ heightbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ depthbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ italicbase [ f ] ] .cint != 0 )
- goto lab11 ;
- }
- {
- {register integer for_end; k = ligkernbase [ f ] ; for_end = kernbase [ f
- ] - 1 ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- {
- if ( ( b < bc ) || ( b > ec ) )
- goto lab11 ;
- }
- if ( c < 128 )
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- else if ( d >= nk )
- goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- if ( ( nl > 0 ) && ( a < 128 ) )
- goto lab11 ;
- {register integer for_end; k = kernbase [ f ] ; for_end = extenbase [ f ]
- - 1 ; if ( k <= for_end) do
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ k ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ k ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- }
- {register integer for_end; k = extenbase [ f ] ; for_end = parambase [ f ]
- - 1 ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- if ( a != 0 )
- {
- if ( ( a < bc ) || ( a > ec ) )
- goto lab11 ;
- }
- if ( b != 0 )
- {
- if ( ( b < bc ) || ( b > ec ) )
- goto lab11 ;
- }
- if ( c != 0 )
- {
- if ( ( c < bc ) || ( c > ec ) )
- goto lab11 ;
- }
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- }
- while ( k++ < for_end ) ; }
- {
- {register integer for_end; k = 1 ; for_end = np ; if ( k <= for_end) do
- if ( k == 1 )
- {
- tfmtemp = getc ( tfmfile ) ;
- sw = tfmtemp ;
- if ( sw > 127 )
- sw = sw - 256 ;
- tfmtemp = getc ( tfmfile ) ;
- sw = sw * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- sw = sw * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- fontinfo [ parambase [ f ] ] .cint = ( sw * 16 ) + ( tfmtemp / 16 ) ;
- }
- else {
-
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ parambase [ f ] + k - 1 ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ parambase [ f ] + k - 1 ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- if ( eof ( tfmfile ) )
- goto lab11 ;
- {register integer for_end; k = np + 1 ; for_end = 7 ; if ( k <= for_end)
- do
- fontinfo [ parambase [ f ] + k - 1 ] .cint = 0 ;
- while ( k++ < for_end ) ; }
- }
- if ( np >= 7 )
- fontparams [ f ] = np ;
- else fontparams [ f ] = 7 ;
- hyphenchar [ f ] = eqtb [ 5313 ] .cint ;
- skewchar [ f ] = eqtb [ 5314 ] .cint ;
- fontname [ f ] = nom ;
- fontarea [ f ] = aire ;
- fontbc [ f ] = bc ;
- fontec [ f ] = ec ;
- fontglue [ f ] = 0 ;
- charbase [ f ] = charbase [ f ] ;
- widthbase [ f ] = widthbase [ f ] ;
- ligkernbase [ f ] = ligkernbase [ f ] ;
- kernbase [ f ] = kernbase [ f ] ;
- extenbase [ f ] = extenbase [ f ] ;
- decr ( parambase [ f ] ) ;
- fmemptr = fmemptr + lf ;
- fontptr = f ;
- g = f ;
- goto lab30 ;
- lab11: {
-
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 133 ) ;
- print ( 655 ) ;
- }
- sprintcs ( u ) ;
- printchar ( 61 ) ;
- printfilename ( nom , aire , 206 ) ;
- if ( s >= 0 )
- {
- print ( 598 ) ;
- printscaled ( s ) ;
- print ( 262 ) ;
- }
- else if ( s != -1000 )
- {
- print ( 656 ) ;
- printint ( - (integer) s ) ;
- }
- if ( fileopened )
- print ( 657 ) ;
- else print ( 658 ) ;
- {
- helpptr = 5 ;
- helpline [ 4 ] = 659 ;
- helpline [ 3 ] = 660 ;
- helpline [ 2 ] = 661 ;
- helpline [ 1 ] = 662 ;
- helpline [ 0 ] = 663 ;
- }
- error () ;
- lab30: if ( fileopened )
- bclose ( tfmfile ) ;
- Result = g ;
- return(Result) ;
- }
-